﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yto.Common.Dependency;
using Yto.EF.Linq;
using Yto.Repositories;

namespace com.ytocargo.Core.FplRouteDetails
{
    public class FplRouteDetailStore : IFplRouteDetailStore, ITransient
    {
        private readonly IBaseRepository<FplRouteDetail> _rep;

        public FplRouteDetailStore(IBaseRepository<FplRouteDetail> repository)
        {
            _rep = repository;
        }
        public IQueryable<FplRouteDetail> GetAll()
        {
            return _rep.GetAll();
        }

        public async Task<List<FplRouteDetail>> GetUnSendListAysnc(int maxCount = 0)
        {
            return await _rep.GetListAsync(x => !x.SendFlag, maxCount);
        }
    }
}
